<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIdxRecordTimeInWorkTimeRecordTable extends AbstractMigration
{
    public function up()
    {
        $this->table('work_time_record')
            ->addIndex(['user_id', 'record_time'], ['type' => 'normal', 'name' => 'idx_user_id_record_time'])
            ->save();

    }

    public function down()
    {
        $this->table('work_time_record')->removeIndexByName('idx_user_id_record_time')->save();
    }
}
